// pages/hotel/hotel.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    index: 0,
    array: ['不限地区', '巴州区', '恩阳区', '通江县', '南江县', '平昌县'],
    starindex: 0,
    stararray: ['不限星级', '一星级', '二星级', '三星级', '四星级', '五星级'],
    needindex:0,
    needarray: ['不限需求', '住宿', '宴席'],
    hotelList:[
      { title: '明珠饭店', price: '99', img: '../../resource/image/jd1.jpg', id: 65},
      { title: '成都大酒店', price: '199', img: '../../resource/image/jd2.jpg', id: 66 },
      { title: '红杏酒家', price: '199', img: '../../resource/image/jd1.jpg', id: 67 },
      { title: '明珠饭店', price: '99', img: '../../resource/image/jd2.jpg',id: 68 }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onShareAppMessage: function () {
      return {
        title: '餐饮酒店B2B云智能采购平台小程序!',
        desc: '众源实业'
      }
    },
    gosearch: function () {
      wx.navigateTo({
        // url: '../jobDetail/jobDetail?id=' + that.data.org_id,
        url: '../searchpage/searchpage'
      })
    },
    bindPickerChange: function (e) {
      console.log('picker发送选择改变，携带值为', e.detail.value)
      this.setData({
        index: e.detail.value
      })
    },
    bindPickerStar: function (e) {
      console.log('picker发送选择改变，携带值为', e.detail.value)
      this.setData({
        starindex: e.detail.value
      })
    },
    bindPickerNeed: function (e) {
      console.log('picker发送选择改变，携带值为', e.detail.value)
      this.setData({
        needindex: e.detail.value
      })
    }
  }
})
